package com.example.youhuo.network


import com.example.myapplication.entity.*
import com.example.yoho.mvp.entitiy.VersionEntity
import com.example.youhuo.entity.Banner_Entity
import com.example.youhuo.entity.BaseEntity
import com.example.youhuo.entity.Tab_Entity

import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST

interface Api {
    companion object {
        var baseUrl: String = "http://iwenwiki.com/api/yoho/"

    }

    @POST("home_recommend.php")
    @FormUrlEncoded
    fun getTabData(@Field("request") request: String): Observable<Tab_Entity>

    @GET("home_banner.php")
    fun getBanner(): Observable<Banner_Entity>


    @POST("brand_list.php")
    @FormUrlEncoded
    fun getfenlei(@Field("request") request: String): Observable<Fenlei_Entity>


    @POST("category_goods.php")
    @FormUrlEncoded
    fun getfenleiImg(@Field("request") request: String): Observable<Clothing_Entity>

    @POST("brand_goods.php")
    @FormUrlEncoded
    fun getdetailsdata(@Field("request") request: String): Observable<Details_Entity>


    @FormUrlEncoded
    @POST("new_login.php")
    fun Login(@Field("request") request: String): Observable<Login_Entity>


    @FormUrlEncoded
    @POST("nowregister.php")
    fun Register(@Field("request") request: String): Observable<Regist_Entity>

    @GET("output.json")
    fun getVersion(): Observable<VersionEntity>

    @FormUrlEncoded
    @POST("add_car.php")
    fun AddCar(@Field("request") request: String): Observable<BaseEntity>

    //    @FormUrlEncoded
//    @POST("carfood.txt")
//    fun getCarGoods(@Field("request")request: String):Observable<>
    @GET("carfood.json")
    fun getCarGoods(): Observable<CarGoods>
















}